﻿using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Web;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
using log4net;
using Microsoft.ApplicationBlocks.Data;
using FunkeLab;
using System.Reflection;
using AnyOffice.general.ipanel;

namespace AnyOffice.general.ipanel
{
    public partial class menu_outlook : BasePage
    {
        public DataTable dtbMenu;
        public int navType=1;

        private static ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

        protected void Page_Load(object sender, EventArgs e)
        {           
            try
            {
                UserCache cache = new UserCache();
                if (cache.MenuHide)
                {
                    this.navType = 0;
                }
                string funcIdStr = cache.FuncIdStr;
                string commandText = "SELECT * FROM [dbo].[Sys_Menu] WHERE [MenuId] IN(SELECT DISTINCT left([MenuId],2) FROM [dbo].[Sys_Function] WHERE CHARINDEX(','+ CAST([FuncId] as nvarchar(20)) + ',','" + funcIdStr + "')>0)";
                this.dtbMenu = SqlHelper.ExecuteDataset(base.Conn, CommandType.Text  , commandText).Tables[0];
            }
            catch (Exception exception)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("", exception);
                }
            }
        }

 

 

    }
}
